/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package InventariosAlmacenes.impl;

import InventariosAlmacenes.Empleado;
import InventariosAlmacenes.InventariosAlmacenesPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Empleado</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link InventariosAlmacenes.impl.EmpleadoImpl#getLogin <em>Login</em>}</li>
 *   <li>{@link InventariosAlmacenes.impl.EmpleadoImpl#getPassword <em>Password</em>}</li>
 *   <li>{@link InventariosAlmacenes.impl.EmpleadoImpl#getPermisos <em>Permisos</em>}</li>
 *   <li>{@link InventariosAlmacenes.impl.EmpleadoImpl#getRol <em>Rol</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class EmpleadoImpl extends PersonaImpl implements Empleado {
	/**
	 * The default value of the '{@link #getLogin() <em>Login</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLogin()
	 * @generated
	 * @ordered
	 */
	protected static final String LOGIN_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getLogin() <em>Login</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLogin()
	 * @generated
	 * @ordered
	 */
	protected String login = LOGIN_EDEFAULT;

	/**
	 * The default value of the '{@link #getPassword() <em>Password</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPassword()
	 * @generated
	 * @ordered
	 */
	protected static final String PASSWORD_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getPassword() <em>Password</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPassword()
	 * @generated
	 * @ordered
	 */
	protected String password = PASSWORD_EDEFAULT;

	/**
	 * The default value of the '{@link #getPermisos() <em>Permisos</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPermisos()
	 * @generated
	 * @ordered
	 */
	protected static final String PERMISOS_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getPermisos() <em>Permisos</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPermisos()
	 * @generated
	 * @ordered
	 */
	protected String permisos = PERMISOS_EDEFAULT;

	/**
	 * The default value of the '{@link #getRol() <em>Rol</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRol()
	 * @generated
	 * @ordered
	 */
	protected static final String ROL_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getRol() <em>Rol</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRol()
	 * @generated
	 * @ordered
	 */
	protected String rol = ROL_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected EmpleadoImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return InventariosAlmacenesPackage.Literals.EMPLEADO;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLogin() {
		return login;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLogin(String newLogin) {
		String oldLogin = login;
		login = newLogin;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, InventariosAlmacenesPackage.EMPLEADO__LOGIN, oldLogin, login));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPassword(String newPassword) {
		String oldPassword = password;
		password = newPassword;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, InventariosAlmacenesPackage.EMPLEADO__PASSWORD, oldPassword, password));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getPermisos() {
		return permisos;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPermisos(String newPermisos) {
		String oldPermisos = permisos;
		permisos = newPermisos;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, InventariosAlmacenesPackage.EMPLEADO__PERMISOS, oldPermisos, permisos));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getRol() {
		return rol;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setRol(String newRol) {
		String oldRol = rol;
		rol = newRol;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, InventariosAlmacenesPackage.EMPLEADO__ROL, oldRol, rol));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case InventariosAlmacenesPackage.EMPLEADO__LOGIN:
				return getLogin();
			case InventariosAlmacenesPackage.EMPLEADO__PASSWORD:
				return getPassword();
			case InventariosAlmacenesPackage.EMPLEADO__PERMISOS:
				return getPermisos();
			case InventariosAlmacenesPackage.EMPLEADO__ROL:
				return getRol();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case InventariosAlmacenesPackage.EMPLEADO__LOGIN:
				setLogin((String)newValue);
				return;
			case InventariosAlmacenesPackage.EMPLEADO__PASSWORD:
				setPassword((String)newValue);
				return;
			case InventariosAlmacenesPackage.EMPLEADO__PERMISOS:
				setPermisos((String)newValue);
				return;
			case InventariosAlmacenesPackage.EMPLEADO__ROL:
				setRol((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case InventariosAlmacenesPackage.EMPLEADO__LOGIN:
				setLogin(LOGIN_EDEFAULT);
				return;
			case InventariosAlmacenesPackage.EMPLEADO__PASSWORD:
				setPassword(PASSWORD_EDEFAULT);
				return;
			case InventariosAlmacenesPackage.EMPLEADO__PERMISOS:
				setPermisos(PERMISOS_EDEFAULT);
				return;
			case InventariosAlmacenesPackage.EMPLEADO__ROL:
				setRol(ROL_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case InventariosAlmacenesPackage.EMPLEADO__LOGIN:
				return LOGIN_EDEFAULT == null ? login != null : !LOGIN_EDEFAULT.equals(login);
			case InventariosAlmacenesPackage.EMPLEADO__PASSWORD:
				return PASSWORD_EDEFAULT == null ? password != null : !PASSWORD_EDEFAULT.equals(password);
			case InventariosAlmacenesPackage.EMPLEADO__PERMISOS:
				return PERMISOS_EDEFAULT == null ? permisos != null : !PERMISOS_EDEFAULT.equals(permisos);
			case InventariosAlmacenesPackage.EMPLEADO__ROL:
				return ROL_EDEFAULT == null ? rol != null : !ROL_EDEFAULT.equals(rol);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (login: ");
		result.append(login);
		result.append(", password: ");
		result.append(password);
		result.append(", permisos: ");
		result.append(permisos);
		result.append(", rol: ");
		result.append(rol);
		result.append(')');
		return result.toString();
	}

} //EmpleadoImpl
